
#pragma once

#include "ICond.h"

class CondE : public ICond
{
public:
	CondE();
	~CondE();
	//////////////////////////// ICond //////////////////////////////////////////////
	virtual int8_t getCondType() { return (int8_t)EDupCondType::EDupCondType_E; };
	virtual bool init(IDuplicate *pDuplicate, const VEC_INT32 *pCond, const string &strSubCond);
	virtual void uninit();
	virtual void condUpdate();
	virtual bool finishCond();
	virtual int32_t result();
	int32_t limitSec();
	virtual void onCreatrueDie(uint64_t cid, int8_t creatureKind);
	virtual void onPlayerLeave(uint64_t cid);
private:
	int32_t checkCond();
private:
	IDuplicate *m_pDuplicate;
	const VEC_INT32 *m_pVecCond;
	int32_t m_result;
	bool m_finish;
	int32_t m_limitSec;
	int8_t m_CreatureKind; //死亡或者离开的生物类型
};